#include <stdio.h>
int main(){
	int a,b,c,n;
	scanf("%d",&n);
	if(100<=n&&n<=999){
		a=n%10;
		b=n%100/10;
		c=n/100;
		if(a*a*a+b*b*b+c*c*c==n){
			printf("Yes");
		}else{
			printf("No");
		}
	}else{
		printf("Invalid Value");
	}return 0;
}
